package com.softWang.system.controller.vo.systemRoles;

import com.softWang.common.validation.InEnum;
import com.softWang.system.constants.DataScopeEnum;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.List;

@Data
public class SystemRolesEditParam {

    @ApiModelProperty(value = "主键id")
    @NotNull(message = "id不能为空")
    private Long id;

    @ApiModelProperty(value = "角色名，最大长度为60位")
    @NotBlank(message = "rname不能为空")
    @Size(max = 60, message = "rname最大长度为60位")
    private String rname;

    @ApiModelProperty(value = "角色后台权限标识，最大长度为60位")
    @Size(max = 60, message = "code最大长度为60位")
    private String code;

    @ApiModelProperty(value = "菜单ID列表")
    private List<Long> menuIds;
    @ApiModelProperty(value = "半选菜单ID列表")
    private List<Long> halfMenuIds;


    @NotNull(message = "dataScope不能为空")
    @InEnum(value = DataScopeEnum.class)
    @ApiModelProperty(value = "数据权限（1：全部数据权限  2：本部门数据权限 3：本部门及以下数据权限 4:指定部门数据权限 5:指定部门及下属部门数据权限 6:仅本人数据权限）")
    private Integer dataScope;

    @ApiModelProperty(value = "数据权限部门ID列表")
    private List<Long> deptIds;
}